<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>DN_INITDIALOG</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../styles/styles.css">
<script language="javascript" src='../../links.js' type="text/javascript"></script>
</head>
<body>

<h1>DN_INITDIALOG</h1>
<div class=navbar>
<a  href="index_dn.html">Events</a> |
<a href="../index.html">Dialog API</a><br>
</div>

<div class=shortdescr>
The <dfn>DN_INITDIALOG</dfn> event is sent to the dialog callback function after all dialog items
are initialized, but before they are displayed.
</div>

<h3>Param1</h3>
<div class=descr>
The ID of the dialog item that will initially receive the keyboard focus.
</div>

<h3>Param2</h3>
<div class=descr>
Programmer specific data that was passed to the <a href="../dialogex.html">DialogEx</a> - in the
Param parameter.
</div>

<h3>Return</h3>
<div class=descr>
TRUE - if dialog items were changed.<br>
FALSE - no changes were made.
</div>

<h3>Remarks</h3>
<div class=descr>
In response to this event the dialog callback function initializes each dialog element to some
correct initial state. For example, it can fill a list item with elements that the user can later
view...<br>

If changes were made but the dialog callback function returned FALSE, the changes will be
discarded.
</div>

<h3>Example</h3>
<div class=descr>
<pre class=code>case <dfn>DN_INITDIALOG</dfn>:
  struct <a href="../structures/fardialogitem.html">FarDialogItem</a> DialogItem;

  Info.<a href="../senddlgmessage.html">SendDlgMessage</a>(hDlg,<a href="dm_getdlgitem.html">DM_GETDLGITEM</a>,75,(LONG_PTR)&amp;DialogItem);
  if(DialogItem.ListItems-&gt;Items[0].Flags&amp;<a href="../structures/farlistitem.html#LIF_SELECTED">LIF_SELECTED</a>)
    Computer=Pl2;
  else
  ...
  return TRUE;</pre>
</div>


<div class=see>See also:</div><div class=seecont>
<a href="../dialogex.html">DialogEx</a><br>

</div>

</body>
</html>
